//
//  JDPlayerUtil.m
//  funcode
//
//  Created by Wan Jiading on 2017/2/10.
//  Copyright © 2017年 WanJiading. All rights reserved.
//

#import "JDPlayerUtil.h"
#import <MobileCoreServices/MobileCoreServices.h>

@implementation JDPlayerUtil

+ (NSString *)tempVideoFilePath {
	return [NSString stringWithFormat:@"%@/player_temp_file.mp3", NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES).lastObject];
}

+ (void)fillInContentInformation:(AVAssetResourceLoadingContentInformationRequest *)contentInformationRequest mimeType:(NSString *)mimeType videoLength:(NSUInteger)videoLength
{
	CFStringRef contentType = UTTypeCreatePreferredIdentifierForTag(kUTTagClassMIMEType, (__bridge CFStringRef)(mimeType), NULL);
	contentInformationRequest.byteRangeAccessSupported = YES;
	contentInformationRequest.contentType = CFBridgingRelease(contentType);
	contentInformationRequest.contentLength = videoLength;
}

@end
